<?php
/**
 * Sale_archive+sale_detail_archive+Product ViewModel
 *
 * @author Mike Gao
 */
class Sale_archiveProductViewModel extends ViewModel{
    protected $pk  = 'Sale_archive.id';

    public $viewFields = array(
    	'Sale_archive' => array('*'),
        
        'Sale_detail_archive' => array('id'=>'did','number', 'price','product_id','out_number','sale_title','total'=>'dtotal','create_time'=>'dctime','sale_title','_on' => 'Sale_archive.id = Sale_detail_archive.sale_id'),
        'Product' => array('id'=>'pid', 'name', 'tm','unit_id','cat_id','cost_default','_on' => 'Sale_detail_archive.product_id = Product.id'),
        
    );


}
?>
